﻿using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using MiniProfilerWebApplication1.Biz.Models;

namespace MiniProfilerWebApplication1.Biz.Maps
{
    public class ProductMap : EntityTypeConfiguration<Product>
    {
        public ProductMap()
        {
            this.ToTable("TProduct");
            this.HasKey(p => p.ProductId);
            this.Property(p => p.ProductName).IsRequired();
            //this.Property(p => p.ProductId).HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
        }
    }
}
